package a02;

import util.Pair;

public class AlphaBetaTicTacToeControl extends MinMaxTicTacToeControl {
    private static final long serialVersionUID = 1L;

    private AlphaBetaGame<Pair<Byte, Byte>> ai = new AlphaBetaGame<Pair<Byte, Byte>>();

    public AlphaBetaTicTacToeControl() {
	this(new TicTacToe());
    }

    public AlphaBetaTicTacToeControl(TicTacToe g) {
	super(g, 12);
	setGameMode1Player(true);
    }

   

    public AlphaBetaGame<Pair<Byte, Byte>> getAi() {
	return this.ai;
    }

    public void setAi(AlphaBetaGame<Pair<Byte, Byte>> ai) {
	this.ai = ai;
    }
    
    @Override
    public void refresh() {
	String status = "";
	boolean thinking = false;
	if (this.getBoard().getGame().currentPlayer() == AbstractRegularGame
		.getOne()) {
	    status = "Sie sind an der Reihe";
	} else {
	    status = "Computer ist dran - bitte klicken!";
	    thinking=true;
	}

	getMenu().setStatus(status,thinking);
	System.out.println(".");
    }
}
